package cn.java76.springboot.demo1.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author oldliu
 * @since 1.0
 */
@Configuration
public class PaperConfig {

    @Bean(name = "a4",initMethod = "initPaper")
    public Paper getA4(){
        Paper p=new Paper();
        p.setLines(20);
        p.setLinewords(16);
        return p;
    }
    @Bean(name = "b5" )
    public Paper getB5(){
        Paper p=new Paper();
        p.setLines(12);
        p.setLinewords(8);
        return p;
    }

}
